package cn.secby.orders.domain;

import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.*;
import cn.secby.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import cn.secby.common.core.web.domain.BaseEntity;

/**
 * 审核记录对象 tb_audit_record
 * @author shenkunlin
 * @date 2025-05-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "tb_audit_record")
public class AuditRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value ="id" ,type = IdType.ASSIGN_ID )
    @JsonSerialize(using=ToStringSerializer.class)
    private Long id;

    /** 订单ID */
    @Excel(name = "订单ID")
    @TableField(value = "order_id")
    private Long orderId;

    /** 退货ID */
    @Excel(name = "退货ID")
    @TableField(value = "return_id")
    private Long returnId;

    /** 审核类型 */
    @Excel(name = "审核类型")
    @TableField(value = "audit_type")
    private Integer auditType;

    /** 审核状态 */
    @Excel(name = "审核状态")
    @TableField(value = "audit_result")
    private Integer auditResult;

    /** 审核备注 */
    @Excel(name = "审核备注")
    @TableField(value = "audit_comment")
    private String auditComment;

    /** 审核员 */
    @Excel(name = "审核员")
    @TableField(value = "auditor_id")
    private Long auditorId;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 40, dateFormat = "yyyy-MM-dd")
    @TableField(value = "auditor_time")
    private LocalDateTime auditorTime;

    /** 来源 */
    @Excel(name = "来源")
    @TableField(value = "spu_source")
    private Integer spuSource;

    /** 是否删除  1 未删除  2 已删除 */
    @Excel(name = "是否删除  1 未删除  2 已删除")
    @TableField(value = "is_delete")
    @TableLogic(value = "1", delval = "2")
    private Integer isDelete;

}
